/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.Gyro;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first.wpilibj.templates.commands.GyroReturnAngle;

/**
 *
 * @author Roksbot
 */
public class Gyroscope extends Subsystem {
    private final static int GYRO_PIN = RobotMap.GyroPin;
    Gyro gyro;
    
    public Gyroscope(){
        gyro = new Gyro(GYRO_PIN);
}
    public void initDefaultCommand() {        
        setDefaultCommand(new GyroReturnAngle());
    }
    public Gyro GetGyro(){
        return gyro;
    }
    public double getAngle(){
        return gyro.getAngle();
    } 
   
}
